package com.webbei.myCustom.action;

import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;

import com.webbei.myCustom.service.myCustomService;

public class redesign{
	private Integer customId;
	private myCustomService mcs;
	private String bgPic;
	private String detail;
	private JSONArray detailinfor;
	public String execute(){
		//Customs c=mcs.getCustomById(customId);
		//bgPic=c.getCustombgPic();
		//detail=c.getCustomDetail();
		//System.out.println("detail:"+detail);
//		JSONArray ja = JSONArray.fromObject(detail);
//		List<PicInfor> pif = new ArrayList<PicInfor>();
//		for(int i=0;i<ja.size();i++){
//			PicInfor picinfor  =new PicInfor();
//			System.out.println(ja.getJSONObject(i).getString("picurl").substring(35));
//			picinfor.setPicUrl(ja.getJSONObject(i).getString("picurl").substring(35));
//			picinfor.setWidth(Integer.valueOf(ja.getJSONObject(i).getString("width")));
//			picinfor.setHeight(Integer.valueOf(ja.getJSONObject(i).getString("height")));
//			picinfor.setLeft(Integer.valueOf(ja.getJSONObject(i).getString("left")));
//			picinfor.setTop(Integer.valueOf(ja.getJSONObject(i).getString("top")));
//			pif.add(picinfor);
//		}
//		detailinfor = JSONArray.fromObject(pif);
//		System.out.println("detailinfor:"+detailinfor);
		return "success";
	}

	public Integer getCustomId() {
		return customId;
	}

	public myCustomService getMcs() {
		return mcs;
	}

	public void setMcs(myCustomService mcs) {
		this.mcs = mcs;
	}

	public void setCustomId(Integer customId) {
		this.customId = customId;
	}

	public String getBgPic() {
		return bgPic;
	}

	public JSONArray getDetailinfor() {
		return detailinfor;
	}

	public void setDetailinfor(JSONArray detailinfor) {
		this.detailinfor = detailinfor;
	}

	public void setBgPic(String bgPic) {
		this.bgPic = bgPic;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}
}
